/**
 * GLCL::DirectLight is light that has only direction, but not position.
 * For example, in real world sun, moon and stars are placed so far that
 * their position not significant: light rays always fall along.
 */

#pragma once

#include <util/vec4.h>
#include "../inc.h"

namespace GLC {

class DirectLight
{
public:
    DirectLight(GLenum lightNo);
    virtual ~DirectLight();

    void setDirection(const vec3f &direction);
    void setDiffuseIntensity(float r, float g, float b, float a = 1.0);
    void setAmbientIntensity(float r, float g, float b, float a = 1.0);
    void setSpecularIntensity(float r, float g, float b, float a = 1.0);

    void enable() const;
    void disable() const;
    bool isEnabled() const;

private:
    mutable bool _isEnabled;
    GLenum _lightNo;

    vec4f _direction;
    vec4f _diffuse;
    vec4f _ambient;
    vec4f _specular;
};

} // namespace GLC
